package io;

import java.io.File;

public class Demo6 {
    public static void main(String[] args) {
        File file = new File("d:/java11");
       if(!file.exists()){
        file.mkdir();
       }
       file.renameTo(new File("d:/java119"));
       System.out.println("重命名成功");
    }

}
